import java.util.Scanner;

/**
 * @author gao
 * @date 2025/8/6 15:34
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.nextLine();
            int countA = 0, countB = 0, countC = 0;
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) == 'a') {
                    countA++;
                } else if (s.charAt(i) == 'b') {
                    countB++;
                } else {
                    countC++;
                }
            }
            System.out.println(countA + " " + countB + " "  + countC);
        }
    }
}